<template>
	<div style="float:right">
		<el-col :span="1.5">
			<el-button size="small" @click="resetForm">重置</el-button>
		</el-col>
		<el-col :span="1.5">
			<el-button type="primary" size="small" @click="queryForm">查询</el-button>
		</el-col>
		<el-col :span="1.5">
			<el-button type="text" size="mini" @click="closeSearch">
				{{ SearchTitle }}
				<i :class="showAll ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"></i>
			</el-button>
		</el-col>
	</div>
</template>
<script>
	export default {
		props: {
			showAll: {
				type: Boolean,
				default: true
			}
		},
		name: 'Search-Button',
		data() {
			return {}
		},
		methods: {
			closeSearch() {
				this.$emit('closePop');
				console.log('子组件的状态：' + this.showAll)
			},
            resetForm() {
                this.$emit('reset');
            },
            queryForm() {
                this.$emit('query');
            }
		},
		computed: {
			SearchTitle: function() {
				if (this.showAll) {
					// 对文字进行处理
					return "展开";
				} else {
					return "收起";
				}
			}
		}
	};
</script>
<style scoped></style>
